package com.kun.rental.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kun.rental.entity.CarrentalInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ikun
 * @since 2024-07-04
 */
@Mapper
public interface CarrentalInfoMapper extends BaseMapper<CarrentalInfo> {

    /**
     * 分页查询
     * @param page
     * @param carrentalInfo
     * @return
     */
    Page<CarrentalInfo> searchByPage(@Param("page") Page<CarrentalInfo> page,
                                     @Param("carrentalInfo") CarrentalInfo carrentalInfo);

    /**
     * 查询需要保养的车辆
     * @return
     */
    List<CarrentalInfo> toBeMaintain();
}
